package com.huqing.icu.base.redis.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @Description Redis地址、端口等配置
 * @Author huqing
 * @Date 2025/1/6 10:14
 **/
@Data
@Configuration
public class RedisClientConfig {

    @Value("${redis.single.address}")
    private String singleAddr;

    @Value("${redis.cluster.address}")
    private String clusterAddr;

    @Value("${redis.used}")
    private String used;

    @Value("${redis.pool.max_total}")
    private int maxTotal;

    @Value("${redis.pool.max_id_le}")
    private int maxIdLe;

    @Value("${redis.pool.min_id_le}")
    private int minIdLe;

    @Value("${redis.pool.max_wait_millis}")
    private int maxWaitMillis;

    @Value("${redis.pool.test_on_borrow}")
    private boolean testOnBorrow;

    @Value("${redis.pool.test_on_return}")
    private boolean testOnReturn;

    @Value("${redis.timeout}")
    private int timeout;

    @Value("${redis.so_timeout}")
    private int soTimeout;

    @Value("${redis.max_attempts}")
    private int maxAttempts;

    @Value("${redis.password}")
    private String password;

}
